import { defineConfig } from 'vitepress'
import { fileURLToPath, URL } from 'node:url'
import vueJsx from '@vitejs/plugin-vue-jsx'

import { containerPreview, componentPreview } from '@vitepress-demo-preview/plugin'
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "D Element",
  description: "A VitePress Site",
  vite: {
    plugins: [
    
    ],
    resolve: {
      alias: {
        '@': fileURLToPath(new URL('../../src', import.meta.url))
      }
    }
  },
  markdown: {
    config(md) {
      md.use(containerPreview)
      md.use(componentPreview)
    }
  },
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '开始使用', link: '/components/button' },
      { text: '组件', link: '/components/button' },
      
    ],

    sidebar: [
      {
        text:'开始使用',
        items:[
          {text: '快速上手', link: '/quickstart'}
        ]
      },
      {
        text: '基础组件',
        items: [
          {text: 'Button 按钮', link: '/components/button' },
          {text: 'Alert 警告', link: '/components/alert'},
          {text: 'Collapse 折叠面板', link: '/components/collapse'},
          {text: 'Tooltip文字提示', link: '/components/tooltip'},
          {text: 'Dropdown下拉菜单', link: '/components/dropdown'},
          {text: 'Message 消息提示' , link: '/components/message'},
          {text: 'Select 下拉菜单', link: '/components/select'},
          {text: 'Switch 选择器', link: '/components/switch'},
          {text: 'Input 输入框', link: '/components/input'},
          {text: 'Form 表单',link: '/components/form'}
        ]
      }
    ],

    socialLinks: [
      { icon: 'github', link: 'https://gitee.com/DhjOring/dh-element-plus.git' }
    ]
  }
})
